Skip to content

Conversation

@kinnison
Copy link
Contributor

This fixes #2571 by rewriting the check for "is this already installed"

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
When we check if an overridden toolchain has everything it needs,
we sometimes decided to reinstall despite everything being present.

This reworks the decision-making to take into account rewritten
component names, and also to handle targets properly.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
@kinnison kinnison added this to the 1.23.0 milestone Nov 25, 2020
Copy link
Contributor

@rbtcollins rbtcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little hard to infer from the diff alone. What caused the repeated syncs?

@kinnison
Copy link
Contributor Author

The issue was twofold.

  1. We weren't running the component names through the rename tables and so "clippy" being "clippy-preview" in the manifest was missed
  2. We weren't treating targets as rust-std properly

@kinnison kinnison merged commit 656d396 into rust-lang:master Nov 25, 2020
@kinnison kinnison deleted the toolchain-reinstalling-fix-2571 branch November 25, 2020 20:49
manifest
} else {
// If we can't read the manifest we'd best try and install
return Ok(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this remove the corrupt dist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it'll bubble the situation up a level which will then try to ensure the component set in question and report something along the lines of:

error: toolchain 'nightly-2020-11-24-x86_64-unknown-linux-gnu' does not support components

I think this is fair enough.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except that that should support components, and the reason it doesn't is that its corrupt, and we know its corrupt because we expected it to support components, and we returned Ok(true) rather than signalling the impossible situation...

I think this is good enough to do a release with; I don't think its good enough to consider done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no, I got that entirely wrong - argh. Let me faff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when I tested this, I must have accidentally reinstalled the test release rather than the version I was editing. I need to push a change to make that Ok(false) and then instead of being crap about it, it'll heal the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New toolchain file format causes unneeded channel syncs

2 participants